package com.module.ble.utils

import android.content.Context
import androidx.work.CoroutineWorker
import androidx.work.Worker
import androidx.work.WorkerParameters
import com.common.app.utls.TimeUtils
import com.module.ble.db.table.UserBloodOxygen
import com.module.ble.db.table.UserBodyTemperature
import com.module.ble.db.table.UserHeartRate
import com.module.ble.listener.CusSynthesisHealthExpandListener
import com.module.ble.repo.BloodOxygenRepo
import com.module.ble.repo.BodyTemperatureRepo
import com.module.ble.repo.HeartRateRepo
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.SupervisorJob
import kotlinx.coroutines.TimeoutCancellationException
import kotlinx.coroutines.async
import kotlinx.coroutines.awaitAll
import kotlinx.coroutines.coroutineScope
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import kotlinx.coroutines.suspendCancellableCoroutine
import kotlinx.coroutines.withContext
import kotlinx.coroutines.withTimeout
import kotlin.coroutines.resumeWithException

/**
 *
 * 作者：sosou
 *
 * 版本：1.0
 *
 * 创建日期：2024/11/15
 *
 * 描述：
 *
 * 修订历史：
 *
 */
class SynRingAllDataWorker(context: Context, params: WorkerParameters)
: CoroutineWorker(context, params) {

    override suspend fun doWork(): Result {
        AizoSDKUtil.queryHealthData(1..7)
        AizoSDKUtil.querySleepData(1..7)
//        AizoSDKUtil.queryHealthData(0..1)
//        AizoSDKUtil.queryYQSingleDaySleepData(0)//测试用
       return Result.success()
    }

}